Get information about upcoming rides
This request is used to learn the preliminary ride price for different classes and create a ride offer.
Request syntax
POST https://business.taxi.yandex.ru/api/1.0/estimate
🔴 We recommend using API 2.0. API 1.0 support will be discontinued in the future.
Request headers:
Authorization
OAuth access token. The steps to get a token are described in Getting started.
Order data is passed in the request body in JSON format:
|
Field |
Description |
Format |
|
|
A block with information about the route. Ride coordinates are provided in the following format:
Required field. |
Array |
|
|
A list of ride requirements. |
Object |
|
|
A phone number for contacting the passenger. |
String |
|
|
The ride class. Required field. |
String |
Response field description
Responses may contain the following fields:
|
Field |
Description |
Format |
|
|
A block with information about the currency. |
Object |
|
|
The currency code. |
String |
|
|
The currency symbol. |
String |
|
|
The template for comments with the price. |
String |
|
|
A text description of the currency. |
String |
|
|
Indicates if the price is fixed. Possible values:
|
Logical |
|
|
A block with ride information for different fares. The block for each class contains the following fields: |
Array of objects |
|
|
The name of the class. |
String |
|
|
A text description of the ride price. |
String |
|
|
A numerical description of the ride price. |
Number |
|
|
An explanation of the fare. |
Array of objects |
|
|
The explanation type. Possible values:
|
String |
|
|
The explanation value. |
String |
|
|
An explanation of the price. |
String |
|
|
The ride offer. Use this field to create a draft order with the ride price indicated in the price field. The offer with the current price is valid for a limited time. If the offer expires, the response to the Process an order request contains a 406 error code. If the phone field is not specified in the request, the price is calculated without creating an offer. |
String |
Request example
POST https://business.taxi.yandex.ru/api/1.0/estimate
...
Authorization: <OAuth token>
{
"route": [
[
37.622504,
55.753215
],
[
37.635813,
55.839525
]
],
"requirements": {
"nosmoking": true,
"conditioner": true
},
"phone": "+71234567890",
"selected_class": "econom"
}
Response example
An example response to this request looks like this:
{
"currency_rules": {
"code": "RUB",
"sign": "₽",
"template": "$VALUE$ $SIGN$$CURRENCY$",
"text": "rub"
},
"is_fixed_price": true,
"service_levels": [
{
"class": "econom",
"price": "460 rubles",
"price_raw": "460",
"details_tariff": [
{
"type": "price",
"value": "from 99 rubles"
},
{
"type": "comment",
"value": "4 minutes included, then 9 rubles/minute"
},
{
"type": "comment",
"value": "2 kilometers included, then 9 rubles/kilometre"
}
],
"fare_disclaimer": "increased demand"
},
...
],
"offer": "1bfc6ef0377607d98deb6b91ab90ef2f"
}
Response codes
The response to this request may contain the following standard HTTP codes:
200: Request completed successfully.400: An unknown parameter or a parameter with an invalid value was passed in the request.401: The OAuth token is incorrect.